package main

import (
	"fmt"
	time2 "time"
)

func main() {
	fmt.Println(time2.Now()) //time.Local时区
	parse, _ := time2.Parse("2006-01-02 15:04:05", time2.Now().Format("2006-01-02 15:04:05"))
	parseInLocation, _ := time2.ParseInLocation("2006-01-02 15:04:05", time2.Now().Format("2006-01-02 15:04:05"), time2.Local)
	fmt.Println(parse.Format("2006-01-02 15:04:05"))           //time.UTC
	fmt.Println(parseInLocation.Format("2006-01-02 15:04:05")) //time.UTC
	var cstZone = time2.FixedZone("CST", 8*3600)               // 东八
	fmt.Println(time2.Now().In(cstZone).Format("2006-01-02 15:04:05"))
}
